home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LTP_RPortAttrs.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  943b  |  57 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. */
  6.  
  7. #include "gtlayout_global.h"
  8.  
  9. VOID __regargs
  10. LTP_SetPens(struct RastPort *rp, UWORD apen, UWORD bpen,UBYTE mode)
  11. {
  12.     if(V39)
  13.         SetABPenDrMd(rp,apen,bpen,mode);
  14.     else
  15.     {
  16.         if(apen != rp -> FgPen)
  17.             SetAPen(rp,apen);
  18.  
  19.         if(bpen != rp -> BgPen)
  20.             SetBPen(rp,bpen);
  21.  
  22.         if(mode != rp -> DrawMode)
  23.             SetDrMd(rp,mode);
  24.     }
  25. }
  26.  
  27.  
  28. /*****************************************************************************/
  29.  
  30.  
  31. VOID __regargs
  32. LTP_SetAPen(struct RastPort *rp,UWORD apen)
  33. {
  34.     ULONG Pen;
  35.  
  36.     if(V39)
  37.         Pen = GetAPen(rp);
  38.     else
  39.         Pen = rp -> FgPen;
  40.  
  41.     if(Pen != apen)
  42.         SetAPen(rp,apen);
  43. }
  44.  
  45.  
  46. /*****************************************************************************/
  47.  
  48.  
  49. VOID __regargs
  50. LTP_SetFont(LayoutHandle *handle,struct TextFont *font)
  51. {
  52.     SetFont(&handle -> RPort,font);
  53.  
  54.     if(handle -> Window)
  55.         SetFont(handle -> Window -> RPort,font);
  56. }
  57.